<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <div id="app">
        <button @click="fun(-1)">上一页</button>
        <img :src="imgSrc">
        <button @click="fun(1)">下一页</button>
        <!-- <img src="./案例图片/波仔1.png"> -->
    </div>

    <script src="https://cdn.jsdelivr.net/npm/vue@2.7.14/dist/vue.js"></script>

    <script>
        const app = new Vue({
            el: '#app',
            data: {
                count: 1,
                imgSrc: "./案例图片/波仔1.png"
            },
            methods: {
                fun(a) {
                    const flag = 1
                    if (this.count == 6 && a == 1) {
                        this.count = 0
                    }
                    if (this.count == 1 && a == -1) {
                        this.count = 7
                    }
                    this.count = this.count + a
                    this.imgSrc = "./案例图片/波仔" + (this.count) + ".png"
                }
            }
        })
    </script>
</body>

</html>